import java.util.concurrent.locks.ReentrantLock;

public class Demo41 {
    public static void main(String[] args) {
        ReentrantLock locker = new ReentrantLock(true);
        try{
            locker.lock();
        }finally{
            //解锁
            locker.unlock();
        }
    }
}
